package com.menghai.mongoDB;

import java.util.Map;
import java.util.Set;
import org.bson.BSONObject;

import com.mongodb.DBObject;
public class MM implements DBObject{
	private int id;
	private String name;
	private int age;

	public MM() {
	}

	public MM(int id, String name, int age) {
		this.id = id;
		this.name = name;
		this.age = age;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public boolean containsField(String arg0) {
		// TODO Auto-generated method stub
		return false;
	}

	public boolean containsKey(String arg0) {
		
		return false;
	}

	public Object get(String arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	public Set<String> keySet() {
		// TODO Auto-generated method stub
		return null;
	}

	public Object put(String arg0, Object arg1) {
		if(arg0.equals("id")){
			this.id = (Integer) arg1;
			return id;
		}else if(arg0.equals("name")){
			this.name = arg1.toString();
			return name;
		}else if(arg0.equals("age")){
			this.age = (Integer) arg1;
			return age;
		}
		
		return null;
	}

	public void putAll(BSONObject arg0) {
		// TODO Auto-generated method stub
		
	}

	public void putAll(Map arg0) {
		// TODO Auto-generated method stub
		
	}

	public Object removeField(String arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	public Map toMap() {
		// TODO Auto-generated method stub
		return null;
	}

	public boolean isPartialObject() {
		// TODO Auto-generated method stub
		return false;
	}

	public void markAsPartialObject() {
		// TODO Auto-generated method stub
		
	}

}
